package com.ycw.service.xiaocai.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ycw.bean.BasicInfo;
import com.ycw.bean.Users;
import com.ycw.dao.BasicInfoMapper;
import com.ycw.dao.UsersMapper;
import com.ycw.service.xiaocai.BasicinfoService;

@Service
public class BasicinfoServiceImpl implements BasicinfoService {

	@Autowired
	BasicInfoMapper basicInfoMapper;
	
	@Autowired
	UsersMapper usersMapper;
	//基本信息添加
	@Override
	public boolean insertBasic(BasicInfo basicInfo) {
		System.out.println("基本信息添加的service层：");
		int i=basicInfoMapper.insertSelective(basicInfo);
		if (i>0) {
			return true;
		}
		return false;
		
	}
	
	
	@Override
	public int getUsersId(Users users) {
		System.out.println("查找用户的Id:");
		return usersMapper.getUsersIdByCid(users);
	}
}
